﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Text;

namespace JX.Infrastructure.Framework.Jwt
{
	/// <summary>
	/// jwt结果类
	/// </summary>
	public class JwtResult
	{
		/// <summary>
		/// 状态
		/// </summary>
		public bool Status { get; set; } = false;

		/// <summary>
		/// 消息
		/// </summary>
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public string Msg { get; set; } = string.Empty;

		/// <summary>
		/// jwt token
		/// </summary>
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public string AccessToken { get; set; } = string.Empty;

		/// <summary>
		/// 刷新token，在AccessToken过期时，进行刷新操作，重新得到新的AccessToken
		/// </summary>
		[DisplayFormat(ConvertEmptyStringToNull = false)]
		public string RefreshToken { get; set; } = string.Empty;

		/// <summary>
		/// AccessToken有效时间戳
		/// </summary>
		public long AccessTokenExpired { get; set; }

		/// <summary>
		/// RefreshToken有效时间戳
		/// </summary>
		public long RefreshTokenExpired { get; set; }
	}
}
